package org.example.一对多.biz;

import org.example.一对多.bean.DeptInfo;
import org.example.一对多.bean.EmpInfo;
import org.example.一对多.dao.DeptInfoDAO;
import org.example.一对多.dao.EmpInfoDAO;

import java.util.Set;

public class DeptBiz {
    DeptInfoDAO didao = new DeptInfoDAO();
    EmpInfoDAO eidao = new EmpInfoDAO();
    public DeptInfo findDeptByid(int deptNo){
        Set<EmpInfo> set = eidao.findEmpByDeptNo(deptNo);
        DeptInfo di = didao.findDeptByid(deptNo);
        di.setEmpSet(set);
        return di;
    }
}
